﻿<%@ WebHandler Language="C#" Class="insertBrand" %>

using System;
using System.Web;
using AMCBO;
using AMCOBJ;

public class insertBrand : IHttpHandler {
    
    public void ProcessRequest (HttpContext context) {
        //context.Response.ContentType = "text/plain";
        //context.Response.Write("Hello World");
        settings BOSettings = new settings();
        settingsObj ObjSettings = new settingsObj();
        int x = 0;
        if (!string.IsNullOrEmpty(context.Request.QueryString["nBrand"]))
        {
            ObjSettings.Brand_Name = context.Request.QueryString["nBrand"].ToString();
        }
        try
        {
            x = BOSettings.insertBrand(ObjSettings);
            if (x == 0)
            {
                context.Response.Write("y");
            }
            else
            {
                context.Response.Write("n");
            }
        }
        catch (Exception ex)
        {
            throw ex;
        }
    }
 
    public bool IsReusable {
        get {
            return false;
        }
    }

}